
$.extend({
	shadeBox:function(options){
		options = $.extend({
			opacity:0.5,
		},options);
		$("body").append("<div class='shade'><div class='box'><div class='title'>X</div><div class='cont'></div></div></div>");
		var shade = $(".shade");
		var f_height = $(document.body).outerHeight(true);
		shade.css({
			"position":"absolute",
			"z-index":10000,
			"left":0,
			"top":0,
			"width":"100%",
			"height":f_height+"px",
			"background":"rgba(31,31,31,"+options.opacity+")",
		});
		var box = $(".box");
		var width = $(window).width();
		var height = $(window).height();
		
		box.css({
			"background":"white",
			"width":"350px",
			"height":"200px",
			"border":"1px solid #ccc",
			"position":"fixed",
			"left":(width-350)/2+"px",
			"top":(height-200)/2+"px",
		});
		var title = $(".title");
		title.css({
			"height":"30px",
			"width":"100%",
			"background":"#CCC",
			"line-height":"30px",
			"cursor":"pointer",
		});
		title.bind('click',function(){
			shade.fadeOut(1200);
		});
	}
});